\hypertarget{classduye_1_1_try_lock}{\section{duye\-:\-:Try\-Lock Class Reference}
\label{classduye_1_1_try_lock}\index{duye\-::\-Try\-Lock@{duye\-::\-Try\-Lock}}
}


{\ttfamily \#include $<$duye\-\_\-lock.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classduye_1_1_try_lock_abe843d4abe39e34547a8140afab385ad}{Try\-Lock} (\hyperlink{classduye_1_1_mutex}{Mutex} \&\hyperlink{classduye_1_1_mutex}{Mutex}, const bool auto\-Unlock=true)
\begin{DoxyCompactList}\small\item\em constructor \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_try_lock_a5e6ced707635dcc841e4bb0852f97def}{lock} (const uint32 timeout=0)
\begin{DoxyCompactList}\small\item\em try lock \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_try_lock_ab035268d572ef60008047804f4ec9821}{unlock} ()
\begin{DoxyCompactList}\small\item\em release lock \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
try lock wrapper 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classduye_1_1_try_lock_abe843d4abe39e34547a8140afab385ad}{\index{duye\-::\-Try\-Lock@{duye\-::\-Try\-Lock}!Try\-Lock@{Try\-Lock}}
\index{Try\-Lock@{Try\-Lock}!duye::TryLock@{duye\-::\-Try\-Lock}}
\subsubsection[{Try\-Lock}]{\setlength{\rightskip}{0pt plus 5cm}duye\-::\-Try\-Lock\-::\-Try\-Lock (
\begin{DoxyParamCaption}
\item[{{\bf Mutex} \&}]{Mutex, }
\item[{const bool}]{auto\-Unlock = {\ttfamily true}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_try_lock_abe843d4abe39e34547a8140afab385ad}


constructor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & \-: mutex \\
\hline
\mbox{\tt in}  & {\em auto\-Unlock} & \-: whether release lock automatic \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}

\end{DoxyNote}


\subsection{Member Function Documentation}
\hypertarget{classduye_1_1_try_lock_a5e6ced707635dcc841e4bb0852f97def}{\index{duye\-::\-Try\-Lock@{duye\-::\-Try\-Lock}!lock@{lock}}
\index{lock@{lock}!duye::TryLock@{duye\-::\-Try\-Lock}}
\subsubsection[{lock}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Try\-Lock\-::lock (
\begin{DoxyParamCaption}
\item[{const uint32}]{timeout = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_try_lock_a5e6ced707635dcc841e4bb0852f97def}


try lock 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em timeout} & \-: try lock timeout, default is zero, indicate try once, then return immediately \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_try_lock_ab035268d572ef60008047804f4ec9821}{\index{duye\-::\-Try\-Lock@{duye\-::\-Try\-Lock}!unlock@{unlock}}
\index{unlock@{unlock}!duye::TryLock@{duye\-::\-Try\-Lock}}
\subsubsection[{unlock}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Try\-Lock\-::unlock (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_try_lock_ab035268d572ef60008047804f4ec9821}


release lock 

\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if construct a release lock, invoke invalid 
\end{DoxyNote}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/system/\hyperlink{duye__lock_8h}{duye\-\_\-lock.\-h}\end{DoxyCompactItemize}
